/*
 * @author Ihsan Al-Hamoud
 * @Web www.al-hamoud.com
 * @Web www.patternsexpert.com
 * @version 1.0
 * If you need a completed Blogger with GWT
 * as Client side. Please email me on
 * ihsan.alhamoud@gmail.com
 * I will be very happy to help.
 */

/* Implementing Singleton Pattern */
package com.patternsexpert.blog.server;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;

public final class PMF {
    private static final PersistenceManagerFactory pmfInstance =
        JDOHelper.getPersistenceManagerFactory("transactions-optional");

    /*The idea is preventing to create 
     * and instance of class by calling 
     * the constructor outside its body
     * */
    private PMF() {}

    public static PersistenceManagerFactory get() {
        return pmfInstance;
    }
}/*End of class PMF implemented by Singleton Pattern*/